package org.flexspeedup.blog.controllers
{
import flash.events.Event;

import org.flexspeedup.blog.models.IApplicationModel;
import org.flexspeedup.blog.models.PopUpModel;

public interface IApplicationController
{

    //--------------------------------------------------------------------------
    //
    //  Methods
    //
    //--------------------------------------------------------------------------

    //----------------------------------
    //  navigateTo
    //----------------------------------
    /**
     * Navigates to a section in a site
     */
    function navigateTo(section:String):void;

    //----------------------------------
    //  notifyChange
    //----------------------------------
    /**
     * Marks the app as <code>hasPendingChanges = true</code>
     */
    function notifyChange():void;

    //----------------------------------
    //  removePendingChanges
    //----------------------------------
    /**
     * Marks the app as <code>hasPendingChanges = false</code>
     */
    function removePendingChanges():void;

    //----------------------------------
    //  showPopUp
    //----------------------------------
    /**
     * Opens a a pop up
     */
    function showPopUp(popUpModel:PopUpModel):void;

    //----------------------------------
    //  closePopUp
    //----------------------------------
    /**
     * Closes the current pop up in the application model
     */
    function closePopUp(removePendingChanges:Boolean = false, nextEvent:Event = null):void;

    //----------------------------------
    //  logout
    //----------------------------------
    /**
     * Ends the session
     */
    function logout():void;
}
}